from flask import Flask, request, session, g, redirect, url_for, \
     abort, render_template, flash

# configuration
# DATABASE = '/tmp/flaskr.db'
# DEBUG = True
# SECRET_KEY = 'development key'
# USERNAME = 'admin'
# PASSWORD = 'default'
#
app = Flask(__name__)

@app.route('/')
def index():
    #return 'Hello World!'
    return render_template('index.html')

@app.route('/movie_history')
def movie_history():
    return render_template('movie_history.html')

@app.route('/movie_fm')
def movie_fm():
    return render_template('movie_fm.html')
# quantitative analysis
@app.route('/movie_quan')
def movie_quan():
    return 'quan'

@app.route('/classic_movie')
def classic_movie():
    return 'classic_movie'

# @app.route('/login')
# def login():
#     abort(401)
#     this_is_never_executed()
# @app.errorhandler(404)
# def page_not_found(error):
#     return render_template('page_not_found.html'), 404
if __name__ == '__main__':
    app.run()

# @app.route('/user/<username>')
# def show_user_profile(username):
#     # show the user profile for that user
#     return 'User %s' % username

# @app.route('/post/<int:post_id>')
# def show_post(post_id):
#     # show the post with the given id, the id is an integer
#     return 'Post %d' % post_id

# @app.route('/hello/')
# @app.route('/hello/<name>')
# def hello(name=None):
#     return render_template('hello.html', name=name)

# with app.test_request_context():
# ...  print url_for('index')
# ...  print url_for('login')
# ...  print url_for('login', next='/')
# ...  print url_for('profile', username='John Doe')
# ...
# /
# /login
# /login?next=/
# /user/John%20Doe
